gh-146065: Fix NULL dereference in FutureIter_am_send#146304
gh-146065: Fix NULL dereference in FutureIter_am_send#146304VanshAgarwal24036 wants to merge 5 commits intopython:mainfrom
Conversation
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
I have made the requested changes; please review again |
|
Thanks for making the requested changes! @picnixz: please review the changes made to this pull request. |
|
I was able to reproduce and verify this fix locally on macOS (x86_64), CPython debug build ( Without the fix ( With the fix ( The fix is minimal and correct, it mirrors the existing guard pattern used elsewhere in the future iterator code paths. |
After throw() or close(), it->future can be NULL. A subsequent send() call would dereference it and crash. This adds a NULL check and raises StopIteration instead.
NULLpointer dereference inFutureIter_am_send#146065